package com.twu.biblioteca;


import java.util.ArrayList;

public class UserList extends ArrayList<User> {

    public User findByLibraryNumber(int libraryNumber) {
        for (User user : this) {
            if (user.getLibraryNumber()==(libraryNumber)) {
                return user;
            }
        }
//        throw new NoSuchElementException("No User with Library Number " + libraryNumber);
        return null;
    }
}
